Skip to main content

Chain

Queries information about a specific chain within the router contract, including details about the factory chain ID, factory address, and channels.


query Chain($chainUid: String!) {
router {
chain(chain_uid: $chainUid) {
chain_uid
chain {
factory_chain_id
factory
chain_type {
# Note: `chain_type` is only applicable to Cosmos chains.
# For EVM chains, this field will return null.
ibc {
from_hub_channel
from_factory_channel
}
}
}
}
}
}

Example

curl --request POST \
    --header 'content-type: application/json' \
    --url 'https://api.euclidprotocol.com/graphql' \
    --data '{"query":"query Chain($chainUid: String!) {\n  router {\n    chain(chain_uid: $chainUid) {\n      chain_uid\n      chain {\n        factory_chain_id\n        factory\n        chain_type {\n          ibc {\n            from_hub_channel\n            from_factory_channel\n          }\n        }\n      }\n    }\n  }\n}","variables":{"chainUid":"osmosis"}}'

Open in Playground

Arguments

NameTypeDescription
chainUidString!The unique identifier of the chain.

Return Fields

ChainInfo

FieldTypeDescription
chainChainDetailed information about the chain.
chain_uidStringThe unique identifier (UID) of the chain.

Chain

FieldTypeDescription
factory_chain_idStringThe chain Id of the config used by the factory.
factoryStringThe contract address of the factory.
chain_typeChainTypeIBC information used by the chain (Cosmos Chains Only).

Chain Type (Cosmos Chains Only)

FieldTypeDescription
from_hub_channelStringThe IBC channel from the router to the chain.
from_factory_channelStringThe IBC channel from the factory to the router.